package com.yingxin.yxerp.module.dingtalk.entity.enums;

/**
 * 企业微信 - 人事助手信息 - 员工状态枚举
 */
public enum WeComEmployeeStatus {
    // 以下注释的内容获取不到企业微信的具体value
    // ONE( 1, "待入职" ),
    // TWO( 2, "放弃入职"),
    // SIX( 6, "已离职"),

    ONE( 1, "正式"),
    TWO( 2, "试用"),
    FIVE( 3, "待离职"),
    ;

    private Integer status;

    private String statusName;

    WeComEmployeeStatus(Integer status, String statusName) {
        this.status = status;
        this.statusName = statusName;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    public static WeComEmployeeStatus getEnum(Integer status) {
        if( status == null  ){
            return null;
        }
        for (WeComEmployeeStatus i : WeComEmployeeStatus.values()) {
            if ( i.getStatus() == status ) {
                return i;
            }
        }
        return null;
    }

}
